package com.bruce.demo2.patterns.demo2.structural.demo08.decorator;

/**
 * @PROJECT_NAME: design_patterns
 * @DESCRIPTION: 牛肉类
 * @AUTHOR: CNBruceLee
 * @DATE: 2021/7/25 21:25
 */
public class Beef extends Garnish {

    public Beef(FastFood fastFood) {
        super(fastFood, "牛肉", 8);
    }

    public float cost() {
        return getPrice() + getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
